package net.sebpx.subgeste.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import net.sebpx.subgeste.dao.HospitalDAO;
import net.sebpx.subgeste.form.Hospital;

@Service
public class HospitalServiceImpl implements HospitalService {

	
	@Autowired
	HospitalDAO  hospitalDAO;
	
	@Override
	@Transactional
	public void addHospital(Hospital hospital) {
		hospitalDAO.addHospital(hospital);
	}

	@Override
	@Transactional
	public void removeHospital(int id) {
		hospitalDAO.removeHospital(id);
	}

	@Override
	@Transactional
	public List<Hospital> listHospitals() {
		return hospitalDAO.listHospitals();
	}

}
